<extend name="./Public/Home/master.html" />
<block name="title">
	<script>
		var ajaxUpdateCart = "{:u('ajaxUpdateCart')}";
	</script>

	</div>
	<!--导航结束-->
	<div class="clear"></div>

	</div>
	<!--头部结束-->
	<!--中间开始-->
	<div id="content">
		<?php if($data['goods']){ ?>
		<form action="{:u('Home/Order/getCartData')}" method="post">


			<div class="car main">
				<div class="carshop">
					<div class="cartitle">
						<div class="carcheck">
							<div class="checkbox">
								<span class="check checkon" id="allcheck"></span>

							</div>
							全选</div>
						<div class="carname">商品名称</div>
						<div class="carmoney">单价</div>
						<div class="carnum">数量</div>
						<div class="carcount">小计</div>
						<div class="carhandle">操作</div>
					</div>
					<!--购物车循环的数据-->
					<foreach name="data['goods']" key="k" item="vo">
						<div class="shopcontent">
							<div class="shopcheck"><div class="checkbox">
								<span class="check checkon"></span>
								<input type="checkbox" name='sid[]' value="{$k}" checked="checked" class="checkhide"/>
							</div></div>
							<div class="shopname">
								<div class="carimg">
									<a href=""><img style="width: 50px" src="__ROOT__/{$vo['pic']}"/></a>
								</div>
								<p>
									<a href="#">{$vo['name']}</a><br>
									<foreach name="vo['options']" key="kk" item="vv">
										<span>{$kk}:{$vv}</span>&nbsp;&nbsp;
									</foreach>
								</p>
							</div>
							<div class="shopmoney">{$vo['price']}</div>
							<div class="shopnum">
								<a href="javascript:;" class="num_l" sid="{$k}">-</a>
								<input type="text" value="{$vo['num']}" />
								<a href="javascript:;" class="num_r" sid="{$k}">+</a>
							</div>
							<div class="shopcount">{$vo['total']}</div>
							<div class="shophandle"><span>x</span></div>
						</div>
					</foreach>



				</div>
				<div class="jiesuan">
					<div class="jixu"><a href="{:u('Home/Index/index')}">继续购物</a></div>
					<div class="gongji">共<span>10</span>种商品<strong>{$data['total_rows']}</strong>件</div>
					<div class="heji">合计<span>{$data['total']}</span></div>
					<div class="gou">
						<?php if(isset($_SESSION['uid'])){?>
						<input type="submit" value="去结算"/>
						<?php }else{ ?>
						<a style="display: block;width: 200px;text-align: center;color: #fff;line-height: 60px;background: #36aa3f;border: none;" href="{:u('Home/Login/index')}">去结算</a>
						<?php } ?>


					</div>

				</div>
			</div>




		</form>

		<?php }else{ ?>
		<div style="padding: 120px;text-align: center">购物车中暂无商品,<a href="__ROOT__" style="color:red">继续购物</a></div>
		<?php } ?>
	</div>
	</div>
	<!--中间结束-->
</block>


